package  
{
	import org.flixel.*;
	
	/**
	 * ...
	 * @author Lachlan McInnes
	 */
	public class MainMenuState extends FlxState
	{
		private var _titleText:FlxText;
		private var _promptText:FlxText;
		
		public function MainMenuState() 
		{
			_titleText = new FlxText(0, 100, FlxG.width, "S.L.H.M.");
			_titleText.setFormat(null, 100, 0x55FF55, "center");
			add(_titleText);
			
			_promptText = new FlxText(0, 350, FlxG.width, "Press space to start");
			_promptText.setFormat(null, 50, 0x5555FF, "center");
			add(_promptText);
		}
		
		override public function update():void 
		{
			super.update();
			
			if (FlxG.keys.pressed("SPACE"))
			{
				OnPrompt();
			}
		}
		
		private function OnPrompt():void
		{
			FlxG.switchState(new BaseGameState());
		}
		
	}

}